export const dncProtocolTypes = [
  {
    label: 'FTP客户端',
    value: '0'
  },
  {
    label: 'FTP服务器端',
    value: '1'
  },
  {
    label: 'Samba客户端',
    value: '2'
  },
  {
    label: 'Samba服务器端',
    value: '3'
  },
  {
    label: 'SSH客户端',
    value: '4'
  },
  {
    label: '厂家私有协议',
    value: '11'
  }
]

export const serialPortList = [
  {
    label: 'RS232_1',
    value: '/dev/ttymxc1'
  },
  {
    label: 'RS232_2',
    value: '/dev/ttymxc2'
  },
  {
    label: 'RS485_1',
    value: '/dev/ttymxc3'
  }
]

export const dncProtocolTypesObj = {}
dncProtocolTypes.forEach(item => {
  dncProtocolTypesObj[item.value] = item.label
})

export const serialPortListObj = {}
serialPortList.forEach(item => {
  serialPortListObj[item.value] = item.label
})

export const collectTypeList = [
  {
    value: '1',
    label: '网口采集'
  },
  {
    value: '2',
    label: '串口采集'
  },
  {
    value: '3',
    label: 'IO口采集'
  }
]

export const collectTypeListObj = {}
collectTypeList.forEach(item => {
  collectTypeListObj[item.value] = item.label
})

export const triggerModeTypes = [
  {
    value: 0,
    label: '常规高电平触发'
  },
  {
    value: 1,
    label: '闪烁触发'
  },
  {
    value: 2,
    label: '常规低电平触发'
  }
]

export const triggerModeObj = {}
triggerModeTypes.forEach(item => {
  triggerModeObj[item.value] = item.label
})

export const ioList = [
  {
    value: 1,
    label: '1'
  },
  {
    value: 2,
    label: '2'
  },
  {
    value: 3,
    label: '3'
  }
]

export const controllerType = [
  {
    key: '数控系统',
    value: '0',
    disabled: false
  },
  {
    key: 'PLC',
    value: '1',
    disabled: false
  },
  {
    key: '仪表(能耗管理)',
    value: '2',
    disabled: false
  },
  {
    key: '机器人控制器',
    value: '3',
    disabled: true
  }
]

export const controllerTypeObj = {}
controllerType.forEach(item => {
  controllerTypeObj[item.value] = item.key
})

export const repTypeList = [
  {
    label: '变化上报',
    value: 1
  },
  {
    label: '周期上报',
    value: 2
  }
]

export const repTypeObj = {}
repTypeList.forEach(item => {
  repTypeObj[item.value] = item.label
})
